#include "StateMachineComponent.h"
#include "events.h"


void StateMachineComponent::onstart()
{
    //事件注册不要写在构造函数里面，因为此时owner还是==null
    //同理，取消注册也不要写在析构函数，有时候为了性能，并不会调用析构函数
    owner->onAddToScene += BIND_MEMBER_FUNCTION(StateMachineComponent::onintoscene);
    owner->onRemoveFromScene += BIND_MEMBER_FUNCTION(StateMachineComponent::onleavescene);
}

void StateMachineComponent::onremove()
{
    owner->onAddToScene -= BIND_MEMBER_FUNCTION(StateMachineComponent::onintoscene);
    owner->onRemoveFromScene -= BIND_MEMBER_FUNCTION(StateMachineComponent::onleavescene);
}

void StateMachineComponent::frameupdate()
{

}

void StateMachineComponent::onintoscene(void* param)
{

}

void StateMachineComponent::onleavescene(void* param)
{

}